#pragma once
#include "FreeImage.h"

namespace Utility{
	struct ImageDescription;
	typedef boost::shared_ptr<ImageDescription> ImageDescriptionPtr;

	class ImageLoader{
	public:
		static ImageDescriptionPtr loadImage(std::string& filename);
	};

	struct ImageDescription{
		ImageDescription():m_image(NULL){}

		~ImageDescription(){
			if(m_image)
				FreeImage_Unload(m_image);
		}

		FIBITMAP *m_image;
		
		unsigned int m_width;
		unsigned int m_height;
		unsigned int m_dataPitch;
		void* m_data;
	};
}